package handler

import (
	"git.oschina.net/fanbuchi/scf-server/config"
	"git.oschina.net/fanbuchi/scf-server/domain"
	"github.com/gin-gonic/gin"
	"net/http"
)

type ConfigHandler struct {

}


// @Summary 查询配置config
// @Description 查询配置config
// @Tags config
// @Accept  json
// @Produce  json
// @Param   env    query    string     true        "默认环境" default(dev)
// @Success 200 {object} domain.Rsp    "调用成功"
// @Router /config/queryMode [get]
func ( handler*ConfigHandler)QueryMode(c *gin.Context){
	env:=c.Query("env")
	data:=config.Config(env)
	rsp:=domain.Rsp{Code:http.StatusOK,Msg:data}
	c.JSON(http.StatusOK,rsp)
}